home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 July / Enter 07 2006.iso / Internet / Feedreader 3.02 / FeedReader302Setup.exe / {app} / udf / ib_udf2.sql < prev   
Encoding:
Text File  |  2006-04-11  |  18.7 KB  |  716 lines

  1. /*
  2.  * The contents of this file are subject to the Interbase Public
  3.  * License Version 1.0 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy
  5.  * of the License at http://www.Inprise.com/IPL.html
  6.  *
  7.  * Software distributed under the License is distributed on an
  8.  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  9.  * or implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *
  12.  * The Original Code was created by Inprise Corporation
  13.  * and its predecessors. Portions created by Inprise Corporation are
  14.  * Copyright (C) Inprise Corporation.
  15.  *
  16.  * All Rights Reserved.
  17.  * Contributor(s): ______________________________________.
  18.  * Revision 1.2  2000/11/28 06:47:52  fsg
  19.  * Changed declaration of ascii_char in ib_udf.sql
  20.  * to get correct result as proposed by Claudio Valderrama
  21.  * 2001.5.19 Claudio Valderrama, add the declaration of alternative
  22.  * substrlen function to handle string,start,length instead.
  23.  * 2004.9.1 Claudio Valderrama, changed some UDF's to be able to detect NULL
  24.  * and renamed the resulting file as ib_udf2.sql.
  25.  *
  26.  */
  27. /*****************************************
  28.  *
  29.  *    a b s
  30.  *
  31.  *****************************************
  32.  *
  33.  * Functional description:
  34.  *     Returns the absolute value of a 
  35.  *     number.  
  36.  *
  37.  *****************************************/
  38. DECLARE EXTERNAL FUNCTION abs 
  39.     DOUBLE PRECISION
  40.     RETURNS DOUBLE PRECISION BY VALUE
  41.     ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';
  42.  
  43. /*****************************************
  44.  *
  45.  *    a c o s
  46.  *
  47.  *****************************************
  48.  *
  49.  * Functional description:
  50.  *    Returns the arccosine of a number 
  51.  *    between -1 and 1, if the number is
  52.  *    out of bounds it returns NaN, as handled
  53.  *    by the _matherr routine.
  54.  *
  55.  *****************************************/
  56. DECLARE EXTERNAL FUNCTION acos 
  57.     DOUBLE PRECISION
  58.     RETURNS DOUBLE PRECISION BY VALUE
  59.     ENTRY_POINT 'IB_UDF_acos' MODULE_NAME 'ib_udf';
  60.  
  61. /*****************************************
  62.  *
  63.  *    a s c i i _ c h a r
  64.  *
  65.  *****************************************
  66.  *
  67.  * Functional description:
  68.  *    Returns the ASCII character corresponding
  69.  *    with the value passed in.
  70.  *
  71.  *****************************************/
  72. DECLARE EXTERNAL FUNCTION ascii_char
  73.     INTEGER NULL
  74.     RETURNS CSTRING(1) FREE_IT
  75.     ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';
  76.  
  77. /*****************************************
  78.  *
  79.  *    a s c i i _ v a l
  80.  *
  81.  *****************************************
  82.  *
  83.  * Functional description:
  84.  *    Returns the ascii value of the character
  85.  *     passed in.
  86.  *
  87.  *****************************************/
  88. DECLARE EXTERNAL FUNCTION ascii_val
  89.     CHAR(1)
  90.     RETURNS INTEGER BY VALUE
  91.     ENTRY_POINT 'IB_UDF_ascii_val' MODULE_NAME 'ib_udf';
  92.  
  93. /*****************************************
  94.  *
  95.  *    a s i n
  96.  *
  97.  *****************************************
  98.  *
  99.  * Functional description:
  100.  *    Returns the arcsin of a number between
  101.  *    -1 and 1, if the number is out of
  102.  *    range NaN is returned.
  103.  *
  104.  *****************************************/
  105. DECLARE EXTERNAL FUNCTION asin 
  106.     DOUBLE PRECISION
  107.     RETURNS DOUBLE PRECISION BY VALUE
  108.     ENTRY_POINT 'IB_UDF_asin' MODULE_NAME 'ib_udf';
  109.  
  110. /*****************************************
  111.  *
  112.  *    a t a n
  113.  *
  114.  *****************************************
  115.  *
  116.  * Functional description:
  117.  *    Returns the arctangent of a number.
  118.  *    
  119.  *
  120.  *****************************************/
  121. DECLARE EXTERNAL FUNCTION atan 
  122.     DOUBLE PRECISION
  123.     RETURNS DOUBLE PRECISION BY VALUE
  124.     ENTRY_POINT 'IB_UDF_atan' MODULE_NAME 'ib_udf';
  125.  
  126. /*****************************************
  127.  *
  128.  *    a t a n 2
  129.  *
  130.  *****************************************
  131.  *
  132.  * Functional description:
  133.  *     Returns the arctangent of the
  134.  *    first param / the second param.
  135.  *
  136.  *****************************************/
  137. DECLARE EXTERNAL FUNCTION atan2 
  138.     DOUBLE PRECISION, DOUBLE PRECISION
  139.     RETURNS DOUBLE PRECISION BY VALUE
  140.     ENTRY_POINT 'IB_UDF_atan2' MODULE_NAME 'ib_udf';
  141.  
  142. /*****************************************
  143.  *
  144.  *    b i n _ a n d
  145.  *
  146.  *****************************************
  147.  *
  148.  * Functional description:
  149.  *    Returns the result of a binary AND 
  150.  *    operation performed on the two numbers.
  151.  *
  152.  *****************************************/
  153. DECLARE EXTERNAL FUNCTION bin_and 
  154.     INTEGER, INTEGER
  155.     RETURNS INTEGER BY VALUE
  156.     ENTRY_POINT 'IB_UDF_bin_and' MODULE_NAME 'ib_udf';
  157.  
  158. /*****************************************
  159.  *
  160.  *    b i n _ o r
  161.  *
  162.  *****************************************
  163.  *
  164.  * Functional description:
  165.  *    Returns the result of a binary OR 
  166.  *    operation performed on the two numbers.
  167.  *
  168.  *****************************************/
  169. DECLARE EXTERNAL FUNCTION bin_or 
  170.     INTEGER, INTEGER
  171.     RETURNS INTEGER BY VALUE
  172.     ENTRY_POINT 'IB_UDF_bin_or' MODULE_NAME 'ib_udf';
  173.  
  174. /*****************************************
  175.  *
  176.  *    b i n _ x o r
  177.  *
  178.  *****************************************
  179.  *
  180.  * Functional description:
  181.  *    Returns the result of a binary XOR 
  182.  *    operation performed on the two numbers.
  183.  *
  184.  *****************************************/
  185. DECLARE EXTERNAL FUNCTION bin_xor 
  186.     INTEGER, INTEGER
  187.     RETURNS INTEGER BY VALUE
  188.     ENTRY_POINT 'IB_UDF_bin_xor' MODULE_NAME 'ib_udf';
  189.  
  190. /*****************************************
  191.  *
  192.  *    c e i l i n g
  193.  *
  194.  *****************************************
  195.  *
  196.  * Functional description:
  197.  *    Returns a double value representing 
  198.  *    the smallest integer that is greater 
  199.  *    than or equal to the input value.
  200.  *
  201.  *****************************************/
  202. DECLARE EXTERNAL FUNCTION ceiling 
  203.     DOUBLE PRECISION
  204.     RETURNS DOUBLE PRECISION BY VALUE
  205.     ENTRY_POINT 'IB_UDF_ceiling' MODULE_NAME 'ib_udf';
  206.  
  207. /*****************************************
  208.  *
  209.  *    c o s
  210.  *
  211.  *****************************************
  212.  *
  213.  * Functional description:
  214.  *    The cos function returns the cosine 
  215.  *    of x. If x is greater than or equal 
  216.  *    to 263, or less than or equal to -263, 
  217.  *    a loss of significance in the result 
  218.  *    of a call to cos occurs, in which case 
  219.  *    the function generates a _TLOSS error 
  220.  *    and returns an indefinite (same as a 
  221.  *    quiet NaN).
  222.  *
  223.  *****************************************/
  224. DECLARE EXTERNAL FUNCTION cos 
  225.     DOUBLE PRECISION
  226.     RETURNS DOUBLE PRECISION BY VALUE
  227.     ENTRY_POINT 'IB_UDF_cos' MODULE_NAME 'ib_udf';
  228.  
  229. /*****************************************
  230.  *
  231.  *    c o s h
  232.  *
  233.  *****************************************
  234.  *
  235.  * Functional description:
  236.  *    The cosh function returns the hyperbolic cosine 
  237.  *    of x. If x is greater than or equal 
  238.  *    to 263, or less than or equal to -263, 
  239.  *    a loss of significance in the result 
  240.  *    of a call to cos occurs, in which case 
  241.  *    the function generates a _TLOSS error 
  242.  *    and returns an indefinite (same as a 
  243.  *    quiet NaN).
  244.  *
  245.  *****************************************/
  246. DECLARE EXTERNAL FUNCTION cosh 
  247.     DOUBLE PRECISION
  248.     RETURNS DOUBLE PRECISION BY VALUE
  249.     ENTRY_POINT 'IB_UDF_cosh' MODULE_NAME 'ib_udf';
  250.  
  251. /*****************************************
  252.  *
  253.  *    c o t
  254.  *
  255.  *****************************************
  256.  *
  257.  * Functional description:
  258.  *    Returns 1 over the tangent of the
  259.  *    input parameter.
  260.  *
  261.  *****************************************/
  262. DECLARE EXTERNAL FUNCTION cot 
  263.     DOUBLE PRECISION
  264.     RETURNS DOUBLE PRECISION BY VALUE
  265.     ENTRY_POINT 'IB_UDF_cot' MODULE_NAME 'ib_udf';
  266.  
  267. /*****************************************
  268.  *
  269.  *    d i v
  270.  *
  271.  *****************************************
  272.  *
  273.  * Functional description:
  274.  *    Returns the quotient part of the division
  275.  *    of the two input parameters.
  276.  *
  277.  *****************************************/
  278. DECLARE EXTERNAL FUNCTION div 
  279.     INTEGER, INTEGER
  280.     RETURNS DOUBLE PRECISION BY VALUE
  281.     ENTRY_POINT 'IB_UDF_div' MODULE_NAME 'ib_udf';
  282.  
  283. /*****************************************
  284.  *
  285.  *    f l o o r
  286.  *
  287.  *****************************************
  288.  *
  289.  * Functional description:
  290.  *     Returns a floating-point value 
  291.  *     representing the largest integer that 
  292.  *    is less than or equal to x    
  293.  *
  294.  *****************************************/
  295. DECLARE EXTERNAL FUNCTION floor 
  296.     DOUBLE PRECISION
  297.     RETURNS DOUBLE PRECISION BY VALUE
  298.     ENTRY_POINT 'IB_UDF_floor' MODULE_NAME 'ib_udf';
  299.  
  300. /*****************************************
  301.  *
  302.  *    f r a c
  303.  *
  304.  *****************************************
  305.  *
  306.  * Functional description:
  307.  *     Returns the fractional part of the argument.
  308.  *
  309.  *****************************************/
  310. DECLARE EXTERNAL FUNCTION frac
  311.     DOUBLE PRECISION
  312.     RETURNS DOUBLE PRECISION BY VALUE
  313.     ENTRY_POINT 'IB_UDF_frac' MODULE_NAME 'ib_udf';
  314.  
  315. /*****************************************
  316.  *
  317.  *    l n
  318.  *
  319.  *****************************************
  320.  *
  321.  * Functional description:
  322.  *    Returns the natural log of a number.
  323.  *
  324.  *****************************************/
  325. DECLARE EXTERNAL FUNCTION ln 
  326.     DOUBLE PRECISION
  327.     RETURNS DOUBLE PRECISION BY VALUE
  328.     ENTRY_POINT 'IB_UDF_ln' MODULE_NAME 'ib_udf';
  329.  
  330. /*****************************************
  331.  *
  332.  *    l o g
  333.  *
  334.  *****************************************
  335.  *
  336.  * Functional description:
  337.  *    log (x,y) returns the logarithm 
  338.  *    base x of y.
  339.  *
  340.  *****************************************/
  341. DECLARE EXTERNAL FUNCTION log 
  342.     DOUBLE PRECISION, DOUBLE PRECISION
  343.     RETURNS DOUBLE PRECISION BY VALUE
  344.     ENTRY_POINT 'IB_UDF_log' MODULE_NAME 'ib_udf';
  345.  
  346. /*****************************************
  347.  *
  348.  *    l o g 1 0
  349.  *
  350.  *****************************************
  351.  *
  352.  * Functional description:
  353.  *    Returns the logarithm base 10 of the
  354.  *    input parameter.
  355.  *
  356.  *****************************************/
  357. DECLARE EXTERNAL FUNCTION log10 
  358.     DOUBLE PRECISION
  359.     RETURNS DOUBLE PRECISION BY VALUE
  360.     ENTRY_POINT 'IB_UDF_log10' MODULE_NAME 'ib_udf';
  361.  
  362. /*****************************************
  363.  *
  364.  *    l o w e r
  365.  *
  366.  *****************************************
  367.  *
  368.  * Functional description:
  369.  *    Returns the input string into lower 
  370.  *    case characters.  Note: This function
  371.  *    will not work with international and 
  372.  *    non-ascii characters.
  373.  *    Note: This function is NOT limited to
  374.  *    receiving and returning only 255 characters,
  375.  *    rather, it can use as long as 32767 
  376.  *     characters which is the limit on an 
  377.  *    INTERBASE character string.
  378.  *
  379.  *****************************************/
  380. DECLARE EXTERNAL FUNCTION "LOWER"
  381.     CSTRING(255) NULL
  382.     RETURNS CSTRING(255) FREE_IT
  383.     ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';
  384.  
  385. /*****************************************
  386.  *
  387.  *    l p a d
  388.  *
  389.  *****************************************
  390.  *
  391.  * Functional description:
  392.  *    Appends the given character to beginning
  393.  *    of the input string until length of the result
  394.  *    string becomes equal to the given number.
  395.  *    Note: This function is NOT limited to
  396.  *    receiving and returning only 255 characters,
  397.  *    rather, it can use as long as 32767 
  398.  *     characters which is the limit on an 
  399.  *    INTERBASE character string.
  400.  *
  401.  *****************************************/
  402. DECLARE EXTERNAL FUNCTION lpad 
  403.     CSTRING(255) NULL, INTEGER, CSTRING(1) NULL
  404.     RETURNS CSTRING(255) FREE_IT
  405.     ENTRY_POINT 'IB_UDF_lpad' MODULE_NAME 'ib_udf';
  406.  
  407. /*****************************************
  408.  *
  409.  *    l t r i m
  410.  *
  411.  *****************************************
  412.  *
  413.  * Functional description:
  414.  *    Removes leading spaces from the input
  415.  *    string.
  416.  *    Note: This function is NOT limited to
  417.  *    receiving and returning only 255 characters,
  418.  *    rather, it can use as long as 32767 
  419.  *     characters which is the limit on an 
  420.  *    INTERBASE character string.
  421.  *
  422.  *****************************************/
  423. DECLARE EXTERNAL FUNCTION ltrim 
  424.     CSTRING(255) NULL
  425.     RETURNS CSTRING(255) FREE_IT
  426.     ENTRY_POINT 'IB_UDF_ltrim' MODULE_NAME 'ib_udf';
  427.  
  428. /*****************************************
  429.  *
  430.  *    m o d
  431.  *
  432.  *****************************************
  433.  *
  434.  * Functional description:
  435.  *    Returns the remainder part of the 
  436.  *    division of the two input parameters.
  437.  *
  438.  *****************************************/
  439. DECLARE EXTERNAL FUNCTION mod 
  440.     INTEGER, INTEGER
  441.     RETURNS DOUBLE PRECISION BY VALUE
  442.     ENTRY_POINT 'IB_UDF_mod' MODULE_NAME 'ib_udf';
  443.  
  444. /*****************************************
  445.  *
  446.  *    p i
  447.  *
  448.  *****************************************
  449.  *
  450.  * Functional description:
  451.  *    Returns the value of pi = 3.1459...
  452.  *
  453.  *****************************************/
  454. DECLARE EXTERNAL FUNCTION pi 
  455.     RETURNS DOUBLE PRECISION BY VALUE
  456.     ENTRY_POINT 'IB_UDF_pi' MODULE_NAME 'ib_udf';
  457.  
  458. /*****************************************
  459.  *
  460.  *    r a n d
  461.  *
  462.  *****************************************
  463.  *
  464.  * Functional description:
  465.  *    Returns a random number between 0 
  466.  *    and 1.  
  467.  * 
  468.  *
  469.  * Note: Use srand to seed the 
  470.  *    random number generator. 
  471.  *    This behavior has been changed.
  472.  *****************************************/
  473. DECLARE EXTERNAL FUNCTION rand 
  474.     RETURNS DOUBLE PRECISION BY VALUE
  475.     ENTRY_POINT 'IB_UDF_rand' MODULE_NAME 'ib_udf';
  476.  
  477.  
  478. /*****************************************
  479.  *
  480.  *    r p a d
  481.  *
  482.  *****************************************
  483.  *
  484.  * Functional description:
  485.  *    Appends the given character to end
  486.  *    of the input string until length of the result
  487.  *    string becomes equal to the given number.
  488.  *    Note: This function is NOT limited to
  489.  *    receiving and returning only 255 characters,
  490.  *    rather, it can use as long as 32767 
  491.  *     characters which is the limit on an 
  492.  *    INTERBASE character string.
  493.  *
  494.  *****************************************/
  495. DECLARE EXTERNAL FUNCTION rpad 
  496.     CSTRING(255) NULL, INTEGER, CSTRING(1) NULL
  497.     RETURNS CSTRING(255) FREE_IT
  498.     ENTRY_POINT 'IB_UDF_rpad' MODULE_NAME 'ib_udf';
  499.  
  500. /*****************************************
  501.  *
  502.  *    r t r i m
  503.  *
  504.  *****************************************
  505.  *
  506.  * Functional description:
  507.  *    Removes trailing spaces from the input
  508.  *    string.
  509.  *    Note: This function is NOT limited to
  510.  *    receiving and returning only 255 characters,
  511.  *    rather, it can use as long as 32767 
  512.  *     characters which is the limit on an 
  513.  *    INTERBASE character string.
  514.  *
  515.  *****************************************/
  516. DECLARE EXTERNAL FUNCTION rtrim 
  517.     CSTRING(255) NULL
  518.     RETURNS CSTRING(255) FREE_IT
  519.     ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';
  520.  
  521. /*****************************************
  522.  *
  523.  *    s i g n
  524.  *
  525.  *****************************************
  526.  *
  527.  * Functional description:
  528.  *    Returns 1, 0, or -1 depending on whether
  529.  *     the input value is positive, zero or 
  530.  *    negative, respectively.
  531.  *
  532.  *****************************************/
  533. DECLARE EXTERNAL FUNCTION sign 
  534.     DOUBLE PRECISION
  535.     RETURNS INTEGER BY VALUE
  536.     ENTRY_POINT 'IB_UDF_sign' MODULE_NAME 'ib_udf';
  537.  
  538. /*****************************************
  539.  *
  540.  *    s i n
  541.  *
  542.  *****************************************
  543.  *
  544.  * Functional description:
  545.  *    Returns the sine of x. If x is greater 
  546.  *    than or equal to 263, or less than or 
  547.  *    equal to -263, a loss of significance 
  548.  *    in the result occurs, in which case the 
  549.  *    function generates a _TLOSS error and 
  550.  *    returns an indefinite (same as a quiet NaN).
  551.  *
  552.  *****************************************/
  553. DECLARE EXTERNAL FUNCTION sin 
  554.     DOUBLE PRECISION
  555.     RETURNS DOUBLE PRECISION BY VALUE
  556.     ENTRY_POINT 'IB_UDF_sin' MODULE_NAME 'ib_udf';
  557.  
  558. /*****************************************
  559.  *
  560.  *    s i n h
  561.  *
  562.  *****************************************
  563.  *
  564.  * Functional description:
  565.  *    Returns the hyperbolic sine of x. If x is greater 
  566.  *    than or equal to 263, or less than or 
  567.  *    equal to -263, a loss of significance 
  568.  *    in the result occurs, in which case the 
  569.  *    function generates a _TLOSS error and 
  570.  *    returns an indefinite (same as a quiet NaN).
  571.  *
  572.  *****************************************/
  573. DECLARE EXTERNAL FUNCTION sinh 
  574.     DOUBLE PRECISION
  575.     RETURNS DOUBLE PRECISION BY VALUE
  576.     ENTRY_POINT 'IB_UDF_sinh' MODULE_NAME 'ib_udf';
  577.  
  578. /*****************************************
  579.  *
  580.  *    s q r t
  581.  *
  582.  *****************************************
  583.  *
  584.  * Functional description:
  585.  *    Returns the square root of a number.
  586.  *
  587.  *****************************************/
  588. DECLARE EXTERNAL FUNCTION sqrt 
  589.     DOUBLE PRECISION
  590.     RETURNS DOUBLE PRECISION BY VALUE
  591.     ENTRY_POINT 'IB_UDF_sqrt' MODULE_NAME 'ib_udf';
  592.  
  593.  
  594. /*****************************************
  595.  *
  596.  *    s r a n d
  597.  *
  598.  *****************************************
  599.  *
  600.  * Functional description:
  601.  *    Returns a random number between 0 
  602.  *    and 1.  Note the random number
  603.  *    generator is seeded using the current 
  604.  *    time.
  605.  *
  606.  *****************************************/
  607. DECLARE EXTERNAL FUNCTION srand 
  608.     RETURNS DOUBLE PRECISION BY VALUE
  609.     ENTRY_POINT 'IB_UDF_srand' MODULE_NAME 'ib_udf';
  610.  
  611.  
  612. /*****************************************
  613.  *
  614.  *    s u b s t r
  615.  *
  616.  *****************************************
  617.  *
  618.  * Functional description:
  619.  *    substr(s,m,n) returns the substring 
  620.  *    of s which starts at position m and
  621.  *    ending at position n.
  622.  *    Note: This function is NOT limited to
  623.  *    receiving and returning only 255 characters,
  624.  *    rather, it can use as long as 32767 
  625.  *     characters which is the limit on an 
  626.  *    INTERBASE character string.
  627.  *      Change by Claudio Valderrama: when n>length(s),
  628.  *      the result will be the original string instead
  629.  *      of NULL as it was originally designed.
  630.  *
  631.  *****************************************/
  632. DECLARE EXTERNAL FUNCTION substr 
  633.     CSTRING(255) NULL, SMALLINT, SMALLINT
  634.     RETURNS CSTRING(255) FREE_IT
  635.     ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
  636.  
  637. /*****************************************
  638.  *
  639.  *    s u b s t r l e n
  640.  *
  641.  *****************************************
  642.  *
  643.  * Functional description:
  644.  *    substr(s,i,l) returns the substring 
  645.  *    of s which starts at position i and
  646.  *    ends at position i+l-1, being l the length.
  647.  *    Note: This function is NOT limited to
  648.  *    receiving and returning only 255 characters,
  649.  *    rather, it can use as long as 32767 
  650.  *     characters which is the limit on an 
  651.  *    INTERBASE character string.
  652.  *
  653.  *****************************************/
  654. DECLARE EXTERNAL FUNCTION substrlen 
  655.     CSTRING(255) NULL, SMALLINT, SMALLINT
  656.     RETURNS CSTRING(255) FREE_IT
  657.     ENTRY_POINT 'IB_UDF_substrlen' MODULE_NAME 'ib_udf';
  658.  
  659. /*****************************************
  660.  *
  661.  *    s t r l e n
  662.  *
  663.  *****************************************
  664.  *
  665.  * Functional description:
  666.  *    Returns the length of a given string.
  667.  *
  668.  *****************************************/
  669. DECLARE EXTERNAL FUNCTION strlen 
  670.     CSTRING(32767) CHARACTER SET NONE
  671.     RETURNS INTEGER BY VALUE
  672.     ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
  673.  
  674. /*****************************************
  675.  *
  676.  *    t a n
  677.  *
  678.  *****************************************
  679.  *
  680.  * Functional description:
  681.  *     Returns the tangent of x. If x is 
  682.  *    greater than or equal to 263, or less 
  683.  *    than or equal to -263, a loss of 
  684.  *    significance in the result occurs, in 
  685.  *    which case the function generates a 
  686.  *    _TLOSS error and returns an indefinite 
  687.  *    (same as a quiet NaN).
  688.  *
  689.  *****************************************/
  690. DECLARE EXTERNAL FUNCTION tan 
  691.     DOUBLE PRECISION
  692.     RETURNS DOUBLE PRECISION BY VALUE
  693.     ENTRY_POINT 'IB_UDF_tan' MODULE_NAME 'ib_udf';
  694.  
  695. /*****************************************
  696.  *
  697.  *    t a n h
  698.  *
  699.  *****************************************
  700.  *
  701.  * Functional description:
  702.  *     Returns the tangent of x. If x is 
  703.  *    greater than or equal to 263, or less 
  704.  *    than or equal to -263, a loss of 
  705.  *    significance in the result occurs, in 
  706.  *    which case the function generates a 
  707.  *    _TLOSS error and returns an indefinite 
  708.  *    (same as a quiet NaN).
  709.  *    
  710.  *****************************************/
  711. DECLARE EXTERNAL FUNCTION tanh 
  712.     DOUBLE PRECISION
  713.     RETURNS DOUBLE PRECISION BY VALUE
  714.     ENTRY_POINT 'IB_UDF_tanh' MODULE_NAME 'ib_udf';
  715.  
  716.